package com.luoc.base.redis;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;


/**
 * @Author: luoc
 * @Date: 2019/7/5 10:24
 */
@Component
@PropertySource(value = {"classpath:redis.properties"}, ignoreResourceNotFound = false, encoding = "UTF-8", name = "redis.properties")
@ConfigurationProperties(prefix = "redis", ignoreUnknownFields = true, ignoreInvalidFields = true)
@Data
public class RedisProperties {

    private String host;

    private Integer port;

    private String password;

    private Integer timeout;

    private Integer maxTotal;

    private Integer maxIdle;

    private Integer minIdle;

    private String prefix;

    private boolean enabled;

}
